#include <iostream>
#include <string>

class BaseClass {
public:
    BaseClass();
    ~BaseClass();

    void doSomething();
};
BaseClass::BaseClass() {
    std::cout<<"enter in BaseClass...\n";
}
BaseClass::~BaseClass() {
    std::cout<<"leave the BaseClass......\n";
}
void BaseClass::doSomething() {
    std::cout<<"I'm doing something in BaseClass doSomething() functiong!\n";
}
class SubClass:public BaseClass {
public:
    SubClass();
    ~SubClass();
};
SubClass::SubClass() {
    std::cout<<"enter in subclass....\n";
}
SubClass::~SubClass() {
    std::cout<<"leave the SubClass......\n";
}
int main()
{
    SubClass sb;
    sb.doSomething();
    std::cout << "wow!!!game over!" << std::endl;
    return 0;
}

